<template>
    <div>
<!--        <h3>直播页面</h3>-->

        <video class="tvhou" width="100%" height="100%"
               controls="controls" autoplay="autoplay"
               x-webkit-airplay="true" x5-video-player-fullscreen="true"
               preload="auto" playsinline="true" webkit-playsinline
               x5-video-player-typ="h5">
            <source type="application/x-mpegURL"
                    v-bind:src="live_source" >
        </video>
    </div>
</template>

<script>
    export default {
        name: "live",
        data:function(){
            return {

                live_source:'',
                live_setting:{
                    domain_name:'',
                    push_flow_ext:'',
                },
            }
        },

        methods:{

            get_live_setting:function(){

                var t = this;
                var url = this.config.app_url + '&r=live.get_live_setting';
                this.axios.get( url ).then(function ( res ) {

                    t.live_source = 'http://' + res.data.domain_name;
                    t.live_source += res.data.push_flow_ext;
                    if( res.data.auth_main_key ){
                        t.live_source += '?auth_key=' + res.data.auth_main_key;
                    }

                });

                this.live_source = '';
            }

        },

        created:function(){

            this.get_live_setting();
        }
    }
</script>

<style scoped>


</style>